Tween Sample Data
Tween sample data is stored in QT atom structures.
At the root level, there are one or more tween entry atoms; these atoms have an atom type value of
'twen'
. Each tween entry atom completely describes one interpolation operation. These atoms should be consecutively numbered starting at 1, using the Atom ID field.
Each tween entry atom contains several more atoms that describe how to perform the interpolation. The Atom ID field in each of these atoms must be set to 1.
-
Tween start atom (atom type is
'twst'
). This atom specifies the time at which the interpolation is to start. The time is expressed in the media's time coordinate system, relative to the start of the media sample. If this atom is not present, the starting offset is assumed to be 0.
-
Tween duration atom (atom type is
'twdu'
). This atom specifies how long the interpolation is to last. The time is expressed in the media's time coordinate system. If this atom is not present, the duration is assumed to be the length of the sample.
-
Tween data atom (atom type is
'twdt'
). This atom contains the actual values for the interpolation. The contents depend on the value of the tween type atom.
-
Tween type atom (atom type is
'twnt'
). Describes the type of interpolation to perform.
Table 0-11
shows all currently defined tween types. All tween types are currently supported using linear interpolation.
Table 11
Tween type values
Tween type
|
Value
|
Tween data
|
16-bit integer
|
1
|
Two 16-bit integers.
|
32-bit integer
|
2
|
Two 32-bit integers.
|
32-bit fixed-point
|
3
|
Two 32-bit fixed-point numbers.
|
Point: two 16-bit integers
|
4
|
Two points.
|
Rectangle: four 16-bit integers
|
5
|
Two rectangles.
|
QuickDraw region
|
6
|
Two matrices. The tween entry atom must contain a
'qdrg'
atom with an Atom ID value of 1. The region is transformed through the interpolated matrices.
|
Matrix
|
7
|
Two matrices.
|
RGB color: three 16-bit integers
|
8
|
Two RGB colors.
|
Graphics mode with RGB color
|
9
|
Two graphics modes with RGB color. Only the RGB color is interpolated. The graphics modes must be the same.
|
© 1997 Apple Computer, Inc.| Previous | Chapter contents | Chapter top | Next |